Optimal. Leaf size=24 \[ -\frac{a}{2 x^2}-\frac{b x^{n-2}}{2-n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0087493, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {14} \[ -\frac{a}{2 x^2}-\frac{b x^{n-2}}{2-n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rubi steps
\begin{align*} \int \frac{a+b x^n}{x^3} \, dx &=\int \left (\frac{a}{x^3}+b x^{-3+n}\right ) \, dx\\ &=-\frac{a}{2 x^2}-\frac{b x^{-2+n}}{2-n}\\ \end{align*}
Mathematica [A] time = 0.0196845, size = 20, normalized size = 0.83 \[ -\frac{a-\frac{2 b x^n}{n-2}}{2 x^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 21, normalized size = 0.9 \begin{align*}{\frac{1}{{x}^{2}} \left ({\frac{b{{\rm e}^{n\ln \left ( x \right ) }}}{-2+n}}-{\frac{a}{2}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.0344, size = 57, normalized size = 2.38 \begin{align*} -\frac{a n - 2 \, b x^{n} - 2 \, a}{2 \,{\left (n - 2\right )} x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.531052, size = 60, normalized size = 2.5 \begin{align*} \begin{cases} - \frac{a n}{2 n x^{2} - 4 x^{2}} + \frac{2 a}{2 n x^{2} - 4 x^{2}} + \frac{2 b x^{n}}{2 n x^{2} - 4 x^{2}} & \text{for}\: n \neq 2 \\- \frac{a}{2 x^{2}} + b \log{\left (x \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b x^{n} + a}{x^{3}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]